package controller;

import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.managerplat.model.Sellers;
import com.managerplat.service.SellersManager;

@Controller
public class ManagerController {
	
	@RequestMapping("/login_info")
	public String login_info()
	{
		return "login_info";
	}
	@RequestMapping("/login")
	public void login(HttpServletRequest request,HttpServletResponse response) throws IOException
	{
		PrintWriter out = response.getWriter();
		request.setCharacterEncoding("UTF-8");
		response.setCharacterEncoding("UTF-8");
		
		String userName = request.getParameter("userName");
		String pwd = request.getParameter("pwd");
		if(userName.equals("admin") && pwd.equals("123456"))
		{
			out.println("success");
		}else
		{
			out.print("false");
		}
		out.close();
	}
	
}
